<script setup lang="ts" name="CpRadioBtnVan">
defineProps<{
  options: {
    label: string
    value: string | number
  }[]
  modelValue: string | number
}>()

const emit = defineEmits<{
  (e: 'update:modelValue', value: string | number): void
}>()
</script>

<template>
  <van-radio-group
    :model-value="modelValue"
    @update:model-value="emit('update:modelValue', $event)"
    direction="horizontal"
  >
    <van-radio v-for="v of options" :key="v.value" :name="v.value">{{
      v.label
    }}</van-radio>
  </van-radio-group>
</template>
